import React, { Component } from 'react'

export default class Info extends Component {
    render() {
        console.log('this.props', this.props);
        /* this.props
            history: {length: 8, action: "PUSH", location: {…}, createHref: ƒ, push: ƒ, …}
            location:
            hash: ""
            key: "ftfixz"
            pathname: "/home/message/info/小张/18/我是第一"
            search: ""
            state: undefined
            [[Prototype]]: Object
            match:
            isExact: true
            params:
            age: "18"
            name: "小张"
            say: "我是第一"
            [[Prototype]]: Object
            path: "/home/message/info/:name/:age/:say"
            url: "/home/message/info/小张/18/我是第一"
        */
        console.log(this.props.match.params);//{name: "小张", age: "18", say: "我是第一"}
        const { name, age, say } = this.props.match.params;
        return (
            <ul>
                <li>姓名：{name}</li>
                <li>年龄:{age}</li>
                <li>说:{say}</li>
            </ul>
        )
    }
}
